// author: Nicolas Liu
// description: Carry-save adder
`include "PRV564Config.v"
`include "PRV564Define.v"
module csa(
    input wire[127:0] x,
    input wire[127:0] y,
    input wire[127:0] z,
    output wire[127:0] s,
    output wire[127:0] c
);
    genvar i;
    generate
        for (i=0; i<128; i=i+1)
        begin: haha
            assign s[i] = x[i] ^ y[i] ^ z[i];
            assign c[i] = (x[i] & y[i]) | (y[i] & z[i]) | (z[i] & x[i]);
        end
    endgenerate
endmodule

